
import React, { useState, useEffect } from 'react';
import './PhysicalExamination.scss';
import HeaderSearch from './HeaderSearch';
import HeadButton from './HeadButton';
import TableBox from './TableBox';
//引入封装好的请求
import http from "../../../services/service";


export default function PhysicalExamination() {

    useEffect(() => {
        getAllOrganization();
      }, []);

    //表格数组
    const [tableData,setTableData]=useState([])

    //获取数据
    const getAllOrganization=()=>{
        http.get('/wf/getAllOrganization').then((res)=>{
            console.log('所有机构',res.data)
            setTableData(res.data)
            console.log('赋值后',tableData)

        })
    }

  return (
        <div className="box">
            <p className="p1">数据筛选</p>
            <div >
                <HeaderSearch/>
            </div>
            <div>
                <HeadButton/>
            </div>
            <div>
                <TableBox tableData={tableData}/>
            </div>
        </div>
  )
}